package gentle.controller;

import gentle.entity.RechargeInfo;
import gentle.service.ICardDetailService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;


@RestController
@RequestMapping("cardDetail")
public class CardDetailController {

    @Autowired
    ICardDetailService cardDetailService;

    /**
     * 储值交易记录
     */
    @RequestMapping(value = "/getEarnestList/{reservationsId}/{abbreviation}")
    @ResponseBody
    public List<RechargeInfo> getEarnestList(@PathVariable String reservationsId, @PathVariable String abbreviation ) throws Exception {
        return cardDetailService.getEarnestList(reservationsId,abbreviation);
    }

}
